class UrlMappings {

	static mappings = {
		"/$controller/$action?/$id?"{
			constraints {
				// apply constraints here
			}
		}

		"/"(controller: "default")
		"500"(view:'/error')

        "/api/bid/getbids/$listingid?"(controller: "bid") {
            action = [GET: "lastBids"]
        }

        "/api/bid/placebid/$listingid?/$bidderid?/$amount?"(controller: "bid") {
            action = [PUT: "placeBid"]
        }

        "/api/listing/getlisting/$listingid?"(controller: "listing", action: "getListing")
	}
}
